package cn.edu.scau.cmi.mazhuanglong.client;

import org.springframework.context.ApplicationContext;

import cn.edu.scau.cmi.mazhuanglong.spring.domain.Student;
import cn.edu.scau.cmi.mazhuanglong.spring.util.ApplicationContextUtil;



public class SpringClient {
	public static void main(String[] args) {
		ApplicationContext ac = getApplicationContext();
		Student student1=(Student) ac.getBean("zhangsan");
		System.out.println(student1.getName()+"的毕业设计指导导师是："+student1.getTutor().getName());
	}

	private static ApplicationContext getApplicationContext() {
		ApplicationContext applicationContext=ApplicationContextUtil.getApplicationContext();
		return applicationContext;
	}
}
